package com.wenli.graduate2022.wenliGreenShop.controller;

import com.wenli.graduate2022.wenliGreenShop.entity.Address;
import com.wenli.graduate2022.wenliGreenShop.service.servDao.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HuangHai
 * @date 2021/10/7 18:13
 */
@RestController
public class AddressController {

    @Autowired
    AddressService addressService;

    @GetMapping("findAddress")  //搞一下正常的地址查询有没有问题
    public Address findAddress(String id){
        Address address=addressService.findById(id);
        System.out.println(address);
        return address;
    }
}
